import random
fall = open("mingdan.txt","r",encoding="UTF-8")
all = fall.read()
namelist = all.split('\n')
s = len(namelist)
sed = 0
shengyu = 0
print("-----计科1813、1814总人数:%d-----"% s)
a = '1'
while a == '1':
    temp = random.choice(namelist)
    namelist.remove(temp)
    print("随机点名选中：%s" % temp)
    sed += 1
    shengyu = s - sed
    print("已随机点名人数：%d,未点到人数：%d"% (sed,shengyu))
    f = open("new.txt","w",encoding="UTF-8")
    for line in namelist:
        f.write(line + '\n')
    f.close()
    if not namelist:
        print("点名结束")
        break
    else:
        print("-"*31)
        a = input("是否继续点名[1继续/0结束]")
        while a != '1' and a!= '0':
            a = input("请输入正确选项[0或1]")